﻿package
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	public class SenderMain extends MovieClip
	{ 
		public function SenderMain()
		{ 
			sendBtn1.addEventListener(MouseEvent.CLICK, sendMessage);
			sendBtn2.addEventListener(MouseEvent.CLICK, sendMessage);
			sendBtn3.addEventListener(MouseEvent.CLICK, sendMessage);
			sendBtn4.addEventListener(MouseEvent.CLICK, sendMessage);
			
			echo.init ( this );
			
		}
		
		private var traceMessage: String;
		private function sendMessage(e:MouseEvent):void
		{
			
			switch ( e.target )
			{
				case sendBtn1:
					echo.debug( textField1.text )
				break;
				
				case sendBtn2:
					echo.info( textField2.text );
				break;			
				
				case sendBtn3:
					echo.error( textField3.text );
				break;
				
				case sendBtn4:
					echo.memory();
				break;
				
			}
			
		}
	}
}